package com.sds.book.springcloud.consumer.controller;

import com.sds.book.dubbo.api.IHelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Reference(mock = "com.sds.book.springcloud.consumer.service.impl.HelloServiceImpl",
            cluster = "failfast")
    private IHelloService iHelloService;

    @GetMapping("/say")
    public String sayHello() {
        return iHelloService.sayHello("SDS");
    }
}
